<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"  %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" href="<%=path%>/css/plugin/zTree/zTreeStyle.css" type="text/css">
	<link rel="stylesheet" type="text/css" href="js/plugin/frame/css/common.css">
	<link rel="stylesheet" type="text/css" href="js/plugin/frame/css/treePanel.css">
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/plugin/frame/treePanel.js"></script>
	<script type="text/javascript" src="js/plugin/zTree/ztree.js"></script>
	<script type="text/javascript" src="js/zTreeSetting.js"></script>
	<script type="text/javascript">
		var nodes =[
			{id:'00000000000000000000000000000000', pId:0,action:'/system/main.jsp', name:"系统管理"},
    		 <s:iterator id="action" value="actionList" >
  				{'id':'<s:property value="#action.id"/>' , 'pId':'<s:property value="#action.pid"/>', 'name':'<s:property value="#action.name"/>',action:'<s:property value="#action.url"/>',newWindow:'<s:property value="#action.newWindow"/>'},
 			 </s:iterator>
    		{"id":18, "pId":'00000000000000000000000000000000', "name":"个人信息"}
		];
		
		$(document).ready(function(){
			new TreePanel({
				renderTo : 'tree',
				treeNodeKey:'id',
				treeNodeParentKey:'pId',
				treeNodes:nodes,
				expandNode:'00000000000000000000000000000000',
				click:function(event,id,node){
					var location = '<%=path%>'+node.action;
					if('true'==node.newWindow){
					$("#leftFrame",window.parent.document).attr("src",location);
					}else{
					$("#mainFrame",window.parent.document).attr("src",location);
					}
					return false;
				},
				load:function(tree){
				var src = '<%=path %>/system/main.jsp';
				$("#mainFrame",window.parent.document).attr("src",src);
				}
			});
		});
	</script>
  </head>
  <body>
 
	<div class="treePanel">
  				<div class="head">
  					<div class="title">系统选项</div>
  					<div class="bar"></div>
  				</div>
  				<div class="panelbody">
					<div class="system"><div class="system_pic"></div><span class="title">功能菜单</span><span class="bar"></span></div>
					<div class="treeContent">
						<ul class="tree" id="tree">
							
						</ul>
					</div>
				<div class=start><div class="system_start"></div><span class="title">系统信息</span><span class="bar"></span></div>
  				</div>
  			</div>
  		</div>
  </body>
</html>
